package com.xsjiong.jaript;

public class JCompilerException extends Exception {
	public static final int SYNTAX_ERROR = 0;

	private int Index;
	private String msg;

	public JCompilerException(int index, String message) {
		this.Index = index;
		this.msg = message;
	}

	@Override
	public String getMessage() {
		if (msg == null) return "Syntax Error At " + Index;
		return "Syntax Error At " + Index + ": " + msg;
	}
}
